package api

// by daoyi
import "github.com/gin-gonic/gin"

type BaseController struct {
}

func (b BaseController) Index(c *gin.Context) {
	//设置cookie
	//参数说明：name:cookie名，value：cookie值，maxAge：cookie有效期，path：路由路径有效，domain：域名，secure：是否只有https可以访问，httpOnly：是否只有后端可以操作
	//c.SetCookie("token","12345678985214789",3600,"/admin","localhost:8090",false,true)
}

func (b BaseController) Success(c *gin.Context) {
	//token,_ :=c.Cookie("token")
	//c.String(200, "成功!cookie="+token)
}
func (b BaseController) Error(c *gin.Context) {
	//c.String(200, "失败!")
}
